package com.deer.wms.instock.service;


import com.deer.wms.ASN.manage.model.asn.AsnMaster;
import com.deer.wms.instock.model.Allot.TransferBillCriteria;
import com.deer.wms.instock.model.disptch.DispatCriteria;
import com.deer.wms.instock.model.transfer.PackBox;
import com.deer.wms.instock.model.transfer.PackBoxData;
import com.deer.wms.instock.model.transfer.TransferBill;
import com.deer.wms.instock.model.transfer.UpperData;
import com.deer.wms.intercept.common.data.CurrentUser;
import com.deer.wms.inventory.model.Inventory.InventoryCriteria;
import com.deer.wms.inventory.model.Inventory.InventoryExcel;
import com.deer.wms.project.root.service.SuperService;
import com.deer.wms.ware.task.model.ErpPushLogInfo;
import com.deer.wms.ware.task.model.SO.SoDetail;
import com.deer.wms.ware.task.model.SO.contrast.ContrastVo;
import com.deer.wms.ware.task.model.SO.vo.SoDetailVo;

import java.util.List;
import java.util.Map;

/**
 * @author : wei
 * @since : 2022-01-08 20:43:19
 **/
public interface TransferBillService extends SuperService<TransferBill> {

    /**
     * 创建并确认转移单
     * @param transferBills 转移单
     * @return List<AcceptRecord>
     */
    List<TransferBill> saveAndConfirmTransferBill(List<TransferBill> transferBills);

    /**
     * 新增转移单
     * @param transferBills 转移单
     * @return List<TransferBill>
     */
    List<TransferBill> createTransferBill(List<TransferBill> transferBills);

    /**
     * 转移单确认
     * @param transferBills 转移单
     * @return List<TransferBill>
     */
    List<TransferBill> confirmTransferBill(List<TransferBill> transferBills);

    /**
     * 查询装箱单据的数据
     * @param transferBillCriteria 单据查询条件实体
     * @return List<AcceptRecord>
     */
    List<TransferBill> selectBillList(TransferBillCriteria transferBillCriteria);


    void saveBillOutInfo( Map<String, Object> map);

    /**
     * 直发虚仓出库
     * @param id
     * @param vmiNumber
     */
    void virtual(Long id, CurrentUser currentUser,Double vmiNumber);



    /**
     * 直发虚仓出库
     * @param soDetail
     */
    void virtualSoDetail(SoDetail soDetail, CurrentUser currentUser);




    /**
     * 转移
     * @param erpPushLogInfo
     * @param id
     */
    void updateErpLog(List<ErpPushLogInfo> erpPushLogInfo, Integer id);


    /**
     *
     * @param criteria
     * @return
     */
    List<AsnMaster> alignList(DispatCriteria criteria);


    /**
     * 详情
     * @param billNo
     * @return
     */
    List<SoDetail> detail(String billNo);


    /**
     * 查其他生产任务单中的数据
     *
     * @param contrastVo@return
     */
    List<SoDetail> beBeing(ContrastVo contrastVo);


    /**
     * 齐套提交
     * @param soDetailVo
     */
    void dispatch(SoDetailVo soDetailVo);


    /**
     * 批量装箱
     * @param packBoxData
     * @param currentUser
     */
    void batchCreatePackBox(PackBoxData packBoxData, CurrentUser currentUser);


    /**
     * 批量上架
     * @param transferBill
     */
    void batchBill(TransferBill transferBill);

    void findCodes();

    void saveBathInv();

    public void batch();

    void upperAsn(UpperData upperData, CurrentUser currentUser);


    /**
     * 生产退料
     * @param soDetails
     * @param billNo
     * @param currentUser
     */
    void PDreturn(List<SoDetail> soDetails, String billNo, CurrentUser currentUser);


    /**
     * PC一键上架
     * @param packBoxData
     * @param currentUser
     */
    void createboxWeb(PackBox packBoxData, CurrentUser currentUser);

    List<InventoryExcel> dowLoadList(InventoryCriteria criteria);
}
